﻿@using FFLTask.GLB.Global.Enum
@using Global.Core.ExtensionMethod
@model FFLTask.SRV.ViewModel.Task._NodeTypeModel
@{
    string src = "/Resource/Image/" + Model.Rank.ToString().ToLower();
    string isVirtual, hasChild;
    if (Model.Virtual)
    {
        isVirtual = "虚";
        src = src + "-dashed";
    }
    else
    {
        isVirtual = "实";
        src = src + "-solid";
    }
    if (Model.HasChild)
    {
        src = src + "-filled";
        hasChild = "有";
    }
    else
    {
        src = src + "-empty";
        hasChild = "无";
    }
    if (!string.IsNullOrEmpty(((string)ViewBag.size)))
    {
        src += "-";
        src += (string)ViewBag.size;
    }
    src = src + ".gif";
    string title = string.Format("{0}{1}任务，{2}子任务",
        isVirtual, Model.Rank.GetEnumDescription(), hasChild);
}
<img src="@src" title="@title" alt="@Model.Rank.GetEnumDescription()" />